import { BaseCondition } from "../../base/BaseCondition";
import { IBehaviour } from "../../interface/IBehaviour";
import { EStatus } from "../../common/EnumType";
import { engine } from "../../../../engine/engine";
export class ConditionIsEnemyDead extends BaseCondition {
    public onUpdate(): EStatus{
        let random: number = this.getRandom();
        if (random < 60) {
            engine.log("Enemy Is Dead");
            return !this.isNegation() ? EStatus.Success : EStatus.Failure;
        } else {
            engine.log("Enemy is Not Dead");
            return !this.isNegation() ? EStatus.Failure : EStatus.Success;
        }

    }

    public addChild(child: IBehaviour): void {
    }

}